# coding: utf-8
from . import db, BaseModel


class Template(BaseModel):
    __tablename__ = 'template'

    auto_id = db.Column(db.Integer, primary_key=True, info='自增主键')
    template_id = db.Column(db.String(20, 'utf8mb4_0900_ai_ci'), nullable=False, info='模板ID')
    user_id = db.Column(db.String(20), info='用户ID')
    cover_pic = db.Column(db.String(500), info='封面图片')
    location = db.Column(db.String(500), info='文件地址')
    is_system = db.Column(db.Integer, info='是否是系统模板：0-否 1-是')
    create_time = db.Column(db.DateTime, server_default=db.FetchedValue(), info='创建时间')
    is_deleted = db.Column(db.Integer, server_default=db.FetchedValue(), info='是否删除')
    template_name= db.Column(db.String(255), info='模版名称')
